package com.vatsalya.bakthi.yoga;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.vatsalya.bakthi.yoga.R;
import com.vatsalya.bakthi.yoga.services.MusicBackgroundService;


public class MantraPlayerActivity extends Activity {
	
	private String fileName = "";
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mantraplayer);
        fileName = getIntent().getExtras().getString("fileName");
   
    }
	
	
	public void playMusicInBackground(View view){
		Intent bgService = new Intent(this, MusicBackgroundService.class);
		bgService.putExtra("fileName", fileName);
		stopService(bgService);
		startService(bgService);
		
		Intent mainActivity = new Intent(this, MainActivity.class);
		startActivity(mainActivity);
	}
}
